<template>
  <el-container class="layout-container">
    <el-aside width="200px">
      <el-scrollbar>
        <el-menu
          router
          background-color="#1491a8"
          class="el-menu-vertical"
          :default-active="defaultActiveIndex"
          active-text-color="#ffd04b"
        >
          <el-menu-item index="home">
            <el-icon><House /></el-icon>
            <span>首页</span>
          </el-menu-item>
          <el-menu-item index="cardTable">
            <el-icon><Platform /></el-icon>
            <span>牌桌管理</span>
          </el-menu-item>
          <el-menu-item index="goods">
            <el-icon><Goods /></el-icon>
            <span>商品管理</span>
          </el-menu-item>
          <el-menu-item index="salesCardTable">
            <el-icon><Document /></el-icon>
            <span>牌桌结算记录</span>
          </el-menu-item>
          <el-menu-item index="salesGoods">
            <el-icon><Shop /></el-icon>
            <span>商品销售记录</span>
          </el-menu-item>
          <el-menu-item index="charts">
            <el-icon><PieChart /></el-icon>
            <span>统计分析</span>
          </el-menu-item>
        </el-menu>
      </el-scrollbar>
    </el-aside>

    <el-container>
      <el-header style="text-align: right; font-size: 12px"> </el-header>
      <el-main>
        <el-scrollbar>
          <router-view />
        </el-scrollbar>
      </el-main>
    </el-container>
  </el-container>
</template>
<script setup>
import { ElButton, inputProps } from "element-plus";
import { Menu as IconMenu, Message, Setting,Goods,GoodsFilled,Document,Platform,TrendCharts,PieChart,House,Shop} from "@element-plus/icons-vue";
import {useRouter} from 'vue-router'
import { ref } from 'vue'

const defaultActiveIndex = ref('home')
const router = useRouter()
router.push("/home")
</script>

<style scoped>
.layout-container{
  height: 100%;
  width: 100%;
  margin: 0px;
  padding: 0px ;
}

.layout-container .el-header {
  position: relative;
  margin-left: 10px;
  /* background-color: var(--el-color-primary-light-7);
  color: var(--el-text-color-primary); */
  background-color: #1491a8;
}
.layout-container .el-aside {
  margin-left: 0px;
  height: 100%;
  background-color: #1491a8;

  color: var(--el-text-color-primary);
  /* background: var(--el-color-primary-light-8); */
}

.layout-container .el-menu {
  border-right: none;
}
.layout-container .el-main {
  margin-left: 10px;
  padding: 0;
  height: 100%;
}
.layout-container .toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  right: 20px;
}

.el-menu-vertical:not(.el-menu--collapse) {
  width: 200px;
  min-height: 780px;
}
</style>